﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MvcShop.Models.Models
{
    [MetadataType(typeof(UserRoleMetadata))]
    public partial class UserRole
    {
    }

    public class UserRoleMetadata
    {
        [Required(ErrorMessage = "用户ID不能空。")]
        public int UserId { get; set; }

        [Required(ErrorMessage = "角色ID不能空。")]
        public int RoleId { get; set; }
    }
}
